package edu.sctu.fengleilin.month05.day150522;

/**
 * Created by user09 on 2015/5/22.
 */
public class TextImoocFive {
    public static void main(String[] args) {

        int sum = 0; // 保存 1-50 之间偶数的和

        int num = 2; // 代表 1-50 之间的偶数

        do {
            sum = sum + num;

            num = num + 2;

        } while (num <= 50);

        System.out.println(" 50以内的偶数之和为：" + sum);
    }
}

